package com.gzcstec.product.exception;

import com.gzcstec.product.enums.ExceptionCodeEnums;

/**
 * 商品exception
 */
public class ProductException extends RuntimeException {

    private Integer code;
    private String message;

    public ProductException(Integer code , String message) {
        super(message);
        this.code = code;
    }

    public ProductException(ExceptionCodeEnums codeEnums) {
        super(codeEnums.getMessage());
        this.code = codeEnums.getCode();
    }
}
